<?php foreach ($list_th as $row_th) {$idth = $row_th->id_m_th_ajaran;$th = $row_th->th_ajaran;};?>
<table class="table table-condensed">
  <thead>
	<tr>
		<th width="30">#</th>
		<th width="160">Kelas</th>
		<th>Wali Kelas</th>
	</tr>
  </thead>
  <tbody>
	<?php 
		if(count($list)>0){
			$i = 1; 
			foreach ($list as $row) {
	?>
	<tr class="hover">
		<td><?php echo $i++ ?></td>
		<td><?php echo $row->kelas; ?></td> 
		<td>
			<?php echo $row->nama_lengkap; ?>
			<?php if($idth >= id_ta_aktif()){?>
			<a class="editorLink pull-right" data-reveal-id="delModal" nama="<?php echo $row->kelas; ?>" 2nd="<?php echo $th;?>" hpid="<?php echo $row->id_a_kelas;?>" data-reveal><span class="glyphicon glyphicon-floppy-remove"></span></a>
			<?php } ?>	
		</td> 
	</tr>
	<?php
			}
		}else{
	?>
	<tr>
		<td colspan="3"><center>Belum ada pengaturan kelas pada tahun ajaran <?php foreach ($list_th as $row_th) {echo $row_th->th_ajaran;};?> </center></td>
	</tr>
	<?php
		}
	?>
  </tbody>
</table>